package composite;/** * Created by Administrator on 2018-10-30. */public class Test {    public static void main(String[] args) {        MenuComponent pancakeHouseMenu = new Menu("pancake house menu","Breakfast");        MenuComponent dinerMenu = new Menu("DINER MENU","LUNCH");        MenuComponent cafeMenu = new Menu("CAFE MENU","Dessert of courseW!");        MenuComponent dessertMemu = new Menu("DESSERT MENU","Dessert of course");        MenuComponent allMenus = new Menu("ALL MENU","ALL menus combined");        allMenus.add(pancakeHouseMenu);        allMenus.add(dinerMenu);        allMenus.add(cafeMenu);        dinerMenu.add(new MenuItem("Pasta","Spaghetti with Marinara Sauce,and a slice of sourdough bread",true,3.89));        dinerMenu.add(dessertMemu);        dessertMemu.add(new MenuItem("Apple pie","Apple Pie with a flakey crust,stopped with vanilla ice cream",true ,1.59));        Waitress waitress = new Waitress(allMenus);        waitress.printMenu();    }}